package com.clz.hyperit.dao.impl;

import org.springframework.stereotype.Repository;

import com.clz.hyperit.dao.RoleDao;
import com.clz.hyperit.entity.Role;

@Repository("roleDao")
public class RoleDaoImpl extends BaseDaoImpl<Role> implements RoleDao {
	public Role getByName(String roleName){
		String hql = "from Role where role = :role";
		 Role role = (Role) getCurrentSession().createQuery(hql)
				.setString("role", roleName).uniqueResult();
		 return role;
	}
}
